﻿using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.ApplicationLifetimes;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;

namespace ScreenshotWindow.ViewModel;

internal class MainViewModel: ObservableObject
{
    public ICommand StartCaptureCommand { get; }

    public MainViewModel()
    {
        StartCaptureCommand = new RelayCommand(StartCapture);
    }

    private void StartCapture()
    {
        var overlay = new CaptureOverlay();
        overlay.ShowDialog(((IClassicDesktopStyleApplicationLifetime)Application.Current?.ApplicationLifetime!).MainWindow!);
    }
}
